package me.hunche.app.dao;

import java.util.Date;
import java.util.List;

import me.hunche.app.domain.Activity;

import com.feinno.framework.common.dao.jpa.EntityJpaDao;

/**
 * 活动表 JPA Dao
 *
 * Date: 2013-05-21 22:36:05
 *
 * @author Acooly Code Generator
 *
 */
public interface ActivityDao extends EntityJpaDao<Activity, Long> {
	public List<Activity> findByActivityDateAndStatus(Date d, int statusVaild);
	
	public List<Activity> findByStatus(int statusVaild);
	public List<Activity> findByStatusAndTeamId(Integer status,Long teamId);
	
	public List<Activity> findByStatusAndTeamIdAndActivityDate(Integer status,Long teamId,Date activityDate);
	
//	@Query("from Activity where teamId = ? order by activityDate desc limit ?")
//	public List<Activity> findLatestByTeamId(Long teamId,Integer maxResults);

}
